<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="true">
  <head>  
    <title>葡萄酒/编辑</title>
    <%@ include file="../link_script.jsp" %>
    <script type="text/javascript">
    $(function() { 
      $("form").validity(function() {
        $("#wineName").require();
        $("#wineNum").require();
      });
    });
  </script>
  </head>
<body> 
<form action="wine.do?method=editWine_Do" method="post" target="_self">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td width="100%" class="STYLE32">编辑葡萄酒</td>
          </tr>
          <tr>
            <td class="STYLE1"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;购买日期: </td>
                <td class="STYLE11"><input type="text" id="wineDate" name="wineDate" value="${wine.wineDate}" size="30" />
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;葡萄酒名称 : </td>
                <td class="STYLE11"><input type="text" id="wineName" name="wineName" value="${wine.wineName}" size="30" title="葡萄酒名不能为空" />
                &nbsp;<font color="red">*</font>&nbsp;&nbsp;</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;卖家 : </td>
                <td class="STYLE11">
                <select id="shopID" name="shopID" onchange="javascript:change();">
                  <option value="${wine.shop.shopID}">${wine.shop.shopName}</option>
                  <option disabled="disabled">------</option>
                  <c:if test="${!empty shopList}">
                    <c:forEach items="${shopList}" var="s">
                      <option value="${s.shopID}">${s.shopName}</option>
                  </c:forEach></c:if></select></td>
              </tr>  
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;种类/产地 : </td>
                <td class="STYLE11"><input type="text" id="wineType" name="wineType" value="${wine.wineType}" size="30" />
                /<input type="text" id="wineCountry" name="wineCountry" value="${wine.wineCountry}" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;葡萄品种 : </td>
                <td class="STYLE11"><input type="text" id="grapeVariety" name="grapeVariety" value="${wine.grapeVariety}" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;级别/规格 : </td>
                <td class="STYLE11"><input type="text" id="wineLevel" name="wineLevel" value="${wine.wineLevel}" size="30" />
                /<input type="text" id="specifications" name="specifications" value="${wine.specifications}" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;香味/色泽 : </td>
                <td class="STYLE11"><input type="text" id="wineFlavour" name="wineFlavour" value="${wine.wineFlavour}" size="30" />
                /<input type="text" id="wineColour" name="wineColour" value="${wine.wineColour}" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;搭配菜肴 : </td>
                <td class="STYLE11"><input type="text" id="withFood" name="withFood" value="${wine.withFood}" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;醒酒时间/品尝温度 : </td>
                <td class="STYLE11"><input type="text" id="wakeupTime" name="temperature" value="${wine.wakeupTime}" size="30" />
                /<input type="text" id="temperature" name="temperature" value="${wine.temperature}" size="30" />&nbsp;分钟/℃
                &nbsp;<font color="red">*</font>&nbsp;建议醒酒时间/最佳品尝温度</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;年份/酒精度 : </td>
                <td class="STYLE11"><input type="text" id="wineYear" name="wineYear" value="${wine.wineYear}" size="30" />
                /<input type="text" id="wineAlcohol" name="wineAlcohol" value="${wine.wineAlcohol}" size="30" />&nbsp;年/%</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;市场价/购买价 : </td>
                <td class="STYLE11"><input type="text" id="wineMarketPrice" name="wineMarketPrice" value="${wine.wineMarketPrice}" size="30" />
                /<input type="text" id="winePurchasePrice" name="winePurchasePrice" value="${wine.winePurchasePrice}" size="30" readonly />
                &nbsp;￥/￥&nbsp;<font color="red">*</font>&nbsp;“购买价”在结算后不允许编辑，如果记错请在“财务管理/记账本”做帐冲销</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;数量 : </td>
                <td class="STYLE11"><input type="text" id="wineNum" name="wineNum" value="${wine.wineNum}" size="30" title="数量不能为空" readonly />
                &nbsp;支&nbsp;<font color="red">*</font>&nbsp;“数量”在结算后不允许编辑，如果记错请在“财务管理/记账本”做帐冲销</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;状态 : </td>
                <td class="STYLE11">
                <select id="wineState" name="wineState">
                  <option value="${wine.wineState}">${wine.wineState}</option>
                  <option disabled="disabled">------</option>
                  <option value="想喝">想喝</option>
                  <option value="在喝">在喝</option>      
                  <option value="已喝">已喝</option>              
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;备注 : </td>
                <td class="STYLE11"><textarea id="wineComment" name="wineComment" cols="54" rows="4" style="font-family:宋体;font-size:12px">${wine.wineComment}</textarea>
                &nbsp;<font color="red">*</font>&nbsp;评论，指专业的品酒师的评论</td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;</td>
                <td class="STYLE11"><input type=hidden id="wineID" name="wineID" value="${wine.wineID}" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td class="STYLE12"><input type="submit" value="提交"/><input type="reset" value="取消"/></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</form>
</body>
</html>
